import UserModel from "./models/user";
import GoodsModel from "./models/goods";
import { DB } from "../../packages/index";
const db = new DB("test", 4, [new UserModel(), new GoodsModel()]);
db.connect(() => {
  const user = new UserModel();
  const data = [];
  for (let i = 0; i < 100; i++) {
    data.push({
      userName: "fff",
      password: "aaa",
    });
  }
  user.insertAll(data).then((res) => {
    console.log(res);
    user.findList().then((res: object[]) => {
      console.log(res.length,'@@@');
    });
  });
  //   user
  //     .find({ id: 3 })
  //     .then((res) => {
  //       console.log(res);
  //     });
});
